package com.taotao.springboot.first.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SampleController {

	@Autowired
	GetPropertiesBean beanValue;
	
	@Autowired
	private Environment environment;

	@RequestMapping("/")
	public String home() {
		return beanValue.getValue1();
	}
	
	@RequestMapping("/test3")
	public String test3() {
		return environment.getProperty("taotao.yaml.value1");
	}
}